<?php
define('IN_OS', true);
if(isset($_POST['sbt'])){
	require(dirname(__FILE__) . '/includes/init.php');
	foreach($_POST['action_id'] as $key=>$action_id){
	     $sql = "INSERT INTO ".$os->table('acl_action'). " VALUES ('$action_id',
	            ".$_POST['parent_id'][$key].",
	            '".$_POST['type'][$key]."',
	            '".$_POST['action_name'][$key]."',
	            '".$_POST['action_code'][$key]."',
	            ".$_POST['sort_order'][$key].",
	            ".$_POST['cid'][$key].")";
	     $db->query("set names utf8");
	     $db->query($sql);	
	}
	//$sql .= $sql;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>OpenShop  管理中心</title>
	</head>
	
	<body>
<form method="post" name="acl_form">
    action_id<input type="text" name="action_id[]" value=""/>&nbsp;&nbsp;
    parent_id<input type="text" name="parent_id[]" value=""/>&nbsp;&nbsp;
    type<select name="type[]">
    	<option value="group">group</option>
    	<option value="url">url</option>
    	<option value="act">act</option>
    	<option value="hidden">hidden</option>
    </select><br/>
    action_name<input type="text" name="action_name[]" value=""/>&nbsp;&nbsp;
    action_code<input type="text" name="action_code[]" value=""/>&nbsp;&nbsp;
    sort_order<input type="text" name="sort_order[]" value=""/>&nbsp;&nbsp;
    cid<input type="text" name="cid[]" value=""/>&nbsp;&nbsp;<br/><br/>
    
    action_id<input type="text" name="action_id[]" value=""/>&nbsp;&nbsp;
    parent_id<input type="text" name="parent_id[]" value=""/>&nbsp;&nbsp;
    type<select name="type[]">
    	<option value="group">group</option>
    	<option value="url">url</option>
    	<option value="act">act</option>
    	<option value="hidden">hidden</option>
    </select><br/>
    action_name<input type="text" name="action_name[]" value=""/>&nbsp;&nbsp;
    action_code<input type="text" name="action_code[]" value=""/>&nbsp;&nbsp;
    sort_order<input type="text" name="sort_order[]" value=""/>&nbsp;&nbsp;
    cid<input type="text" name="cid[]" value=""/>&nbsp;&nbsp;<br/><br/>

    action_id<input type="text" name="action_id[]" value=""/>&nbsp;&nbsp;
    parent_id<input type="text" name="parent_id[]" value=""/>&nbsp;&nbsp;
    type<select name="type[]">
    	<option value="group">group</option>
    	<option value="url">url</option>
    	<option value="act">act</option>
    	<option value="hidden">hidden</option>
    </select><br/>
    action_name<input type="text" name="action_name[]" value=""/>&nbsp;&nbsp;
    action_code<input type="text" name="action_code[]" value=""/>&nbsp;&nbsp;
    sort_order<input type="text" name="sort_order[]" value=""/>&nbsp;&nbsp;
    cid<input type="text" name="cid[]" value=""/>&nbsp;&nbsp;<br/><br/>
    action_id<input type="text" name="action_id[]" value=""/>&nbsp;&nbsp;
    parent_id<input type="text" name="parent_id[]" value=""/>&nbsp;&nbsp;
    type<select name="type[]">
    	<option value="group">group</option>
    	<option value="url">url</option>
    	<option value="act">act</option>
    	<option value="hidden">hidden</option>
    </select><br/>
    action_name<input type="text" name="action_name[]" value=""/>&nbsp;&nbsp;
    action_code<input type="text" name="action_code[]" value=""/>&nbsp;&nbsp;
    sort_order<input type="text" name="sort_order[]" value=""/>&nbsp;&nbsp;
    cid<input type="text" name="cid[]" value=""/>&nbsp;&nbsp;<br/><br/>
    
    action_id<input type="text" name="action_id[]" value=""/>&nbsp;&nbsp;
    parent_id<input type="text" name="parent_id[]" value=""/>&nbsp;&nbsp;
    type<select name="type[]">
    	<option value="group">group</option>
    	<option value="url">url</option>
    	<option value="act">act</option>
    	<option value="hidden">hidden</option>
    </select><br/>
    action_name<input type="text" name="action_name[]" value=""/>&nbsp;&nbsp;
    action_code<input type="text" name="action_code[]" value=""/>&nbsp;&nbsp;
    sort_order<input type="text" name="sort_order[]" value=""/>&nbsp;&nbsp;
    cid<input type="text" name="cid[]" value=""/>&nbsp;&nbsp;<br/><br/>
    
    action_id<input type="text" name="action_id[]" value=""/>&nbsp;&nbsp;
    parent_id<input type="text" name="parent_id[]" value=""/>&nbsp;&nbsp;
    type<select name="type[]">
    	<option value="group">group</option>
    	<option value="url">url</option>
    	<option value="act">act</option>
    	<option value="hidden">hidden</option>
    </select><br/>
    action_name<input type="text" name="action_name[]" value=""/>&nbsp;&nbsp;
    action_code<input type="text" name="action_code[]" value=""/>&nbsp;&nbsp;
    sort_order<input type="text" name="sort_order[]" value=""/>&nbsp;&nbsp;
    cid<input type="text" name="cid[]" value=""/>&nbsp;&nbsp;<br/><br/>   
    <input type="submit" value=" submit " name="sbt"/>
</form>
</body>
</html>